package com.newegg.nlp.arangodb.dao;

import com.newegg.nlp.arangodb.BasicDao;
import com.newegg.nlp.arangodb.model.Category;

public interface CategoryDao extends BasicDao<Category>{

	default Category getOrCreate(String id, String category) {
		Category c = get(id);
		if(c == null) {
			c = new Category();
			c.setId(id);
			c.setName(category);
			saveNotExist(c);
		}
		return c;
	};
}
